package com.suse.service.view.edu.controller;


import com.suse.common.config.response.R;
import com.suse.service.view.edu.service.TeacherService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 讲师 前端控制器
 * </p>
 *
 * @author 辜玉彬
 * @since 2022-08-16
 */
@Api(tags = "讲师接口")
@RestController
@RequestMapping("/teacher")
public class TeacherController {

    @Resource
    private TeacherService teacherService;

    @ApiOperation(value = "获取讲师列表")
    @GetMapping("/list")
    public R getTeacherList() {
        return teacherService.getTeacherList();
    }

    @ApiOperation(value = "通过ID获取讲师信息和讲师课程")
    @GetMapping("/info-and-course/{id}")
    public R getTeacherInfoAndCourseById(@PathVariable("id") String id) {
        return teacherService.getTeacherInfoAndCourseById(id);
    }


}

